{% extends "base.html" %}
{# Copyright The IETF Trust 2021, All Rights Reserved #}
{% load origin %}
{% load django_bootstrap5 %}
{% block pagehead %}{{ form.media.css }}{% endblock %}
{% block title %}Edit timeslot "{{ timeslot.name }}" for {{ timeslot.meeting }}{% endblock %}
{% block content %}
    {% origin %}
    <h1>
        Edit {{ timeslot.meeting }} timeslot
        <br>
        <small class="text-body-secondary">{{ timeslot.name }}</small>
    </h1>
    {% if sessions %}
        <div class="alert alert-warning my-3">
            This timeslot currently has the following sessions assigned to it:
            <ul class="mb-0">
                {% for s in sessions %}<li>{{s }}</li>{% endfor %}
            </ul>
        </div>
    {% endif %}
    <form method="post" class="my-3">
        {% csrf_token %}
        <!-- [html-validate-disable-block input-missing-label -- FIXME: django_bootstrap5 uses outdated HTML] -->
        {% bootstrap_form form %}
        <button type="submit" class="btn btn-primary">Save</button>
        <a class="btn btn-secondary float-end"
           href="{% url 'ietf.meeting.views.edit_timeslots' num=timeslot.meeting.number %}{% if "sched" in request.GET %}?sched={{ request.GET.sched }}{% endif %}">
            Back
        </a>
    </form>
{% endblock %}
{% block js %}{{ form.media.js }}{% endblock %}